package cn.jiyun.controller;

import cn.jiyun.dao.paper.PaperDTO;
import cn.jiyun.feign.PaperFeign;
import cn.jiyun.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author 王晨
 * Date 2023/8/25
 */

@RestController
@RequestMapping("/paper")
public class PaperController {
    @Autowired
    private PaperFeign paperFeign;

    @RequestMapping("/findpaper")//查询试卷包括有多少题
    public R findpaper(){
        return paperFeign.findPaper();
    }

    @RequestMapping("/findTrainPaper")//查询有几人已学
    public R findTrainPaper(PaperDTO paperDTO){
        return paperFeign.findTrainPaper(paperDTO);
    }
    @RequestMapping("/findStatus")//将已参赛的该为1
    public R findStatus(Integer id){
        return paperFeign.findStatus(id);
    }
    @RequestMapping("/findBijiao")
    public R findBijiao(Integer id){
        return paperFeign.findBijiao(id);
    }

    @RequestMapping("/findPaperTest")//查询测验
    public R findPaperTest(PaperDTO paperDTO){
        return paperFeign.findPaperTest(paperDTO);
    }

}
